package plagiarism;

import io.ScannerTest;

import java.util.ArrayList;

import words.ArticleResult;

public class BigController {
	private ArrayList<ArticleResult> articleresults;
	public BigController(String[] article_names){
	FileManager filemanager = new FileManager(article_names);
	
	// 3. send the filenames to the next class
	for (int i = 0; i < IO.num; i++) {
		System.out.println(article_names[i]);
	}
	
	ArrayList<String[]> a1_list = new ArrayList<String[]>();
	
	// 4. run scanmanager
	/*
	ScanManager scanmanager = new ScanManager(filemanager);
	scanmanager.scan(a1_list, article_names);
	*/
	ScannerTest scannertest = new ScannerTest();
	for(int i =0 ;i < article_names.length; i ++)
	{
		scannertest.setfilename(article_names[i]);
		scannertest.run();
		a1_list.add(scannertest.getlist());
		scannertest.clear();
	}
	
	
	//Run CheckManager
	CheckManager checkmanager = new CheckManager();
	checkmanager.operation(a1_list);
	checkmanager.checking();
	articleresults = checkmanager.output_all();
	ResultManager resultmanager = new ResultManager(articleresults);
	}
}
